import { RequestConfigExtra, usePost } from "@/http"

const options: RequestConfigExtra = {
    success: false,
    error: true
}

const login = async (data: any) => {
    return usePost("/login", data, options)
}

const logout = async () => {
    return usePost("/logout", {}, options)
}

const checkToken = async () => {
    return usePost("/checkLogin", {}, options)
}

export const api = { login, logout, checkToken }
